package com.example.entity;

import com.google.gson.Gson;

public class People {
private String id;
private String name;
private String gender;
private String idno;
private int age;
private String address;
private String crimeRecord;
private String pic;
public String getId() {
	return id;
}
public void setId(String id) {
	this.id = id;
}
public String getName() {
	return name;
}
public void setName(String name) {
	this.name = name;
}
public String getGender() {
	return gender;
}
public void setGender(String gender) {
	this.gender = gender;
}
public String getIdno() {
	return idno;
}
public void setIdno(String idno) {
	this.idno = idno;
}
public int getAge() {
	return age;
}
public void setAge(int age) {
	this.age = age;
}
public String getAddress() {
	return address;
}
public void setAddress(String address) {
	this.address = address;
}
public String getCrimeRecord() {
	return crimeRecord;
}
public void setCrimeRecord(String crimeRecord) {
	this.crimeRecord = crimeRecord;
}
public String getPic() {
	return pic;
}
public void setPic(String pic) {
	this.pic = pic;
}
@Override
public String toString() {
	StringBuilder sb=new StringBuilder("");
	sb.append("身份证号:");
	sb.append(idno);
	sb.append(" \n");
	
	sb.append("姓名:");
	sb.append(name);
	sb.append(" \n");
	
	sb.append("性别:");
	sb.append(gender);
	sb.append(" \n");

	sb.append("年龄:");
	sb.append(age);
	sb.append(" \n");
	
	sb.append("籍贯:");
	sb.append(address);
	sb.append(" \n");
	
	sb.append("犯罪记录:");
	sb.append(crimeRecord);
	sb.append(" \n");

	sb.append("图片地址:");
	sb.append(pic);
	//sb.append(  "\n");
	return sb.toString();
}
public static void main(String[] args) {
	String fileName="dsadasd.jpg";
	int idx=fileName.indexOf(".");
	String subfix=fileName.substring(idx+1);
	System.out.println(subfix);
//	Gson gson = new Gson();  
//	  
//    People student1 = new People();  
//    student1.setId("121");  
//    student1.setName("李坤");  
//   
//
//    // //////////////////////////////////////////////////////////  
//    System.out.println("----------简单对象之间的转化-------------");  
//    // 简单的bean转为json  
//    String s1 = gson.toJson(student1);  
//    System.out.println("简单Bean转化为Json===" + s1);  

//	String test="身份证号:12345 姓名:灰太狼 性别:男 年龄:28 籍贯:羊村旁边的古堡 犯罪记录:吃羊肉串 图片地址:http://192.168.0.112:8080/huitailang.jpg ";
//	String a[] = test.split(":");  
//    
//    System.out.println(a[0]);  
//    System.out.println(a[1]);  
//    System.out.println(a[2]);
//    System.out.println(a[3]);  
//    System.out.println(a[4]);  
//    System.out.println(a[5]);  
//    System.out.println(a[6]);  
//    System.out.println(a[7]);  
//    System.out.println(a[8]);  
//    System.out.println(a[9]);  
//    int start=test.indexOf("址:");
//   	System.out.println("截取字符串start"+start);
//    String imageUrl=test.substring(start+2, test.length());
//	System.out.println("获得在逃人员的基本信息是: "+test);
//	System.out.println("获得在逃人员的照片地址是: "+imageUrl);
}

}
